<?php
class All_Bid extends CWidget{
    public $id;
    public function init(){
        $criteria = new CDbCriteria;
        $criteria->order ="bid_contracted DESC";
        $criteria->condition = 'service_id='.$this->id;
        
        $dataProvider=new CActiveDataProvider('BidService',
            array(
                'criteria'=>$criteria,
                'pagination'=>array(
                'pageSize'=>5,
                ),
            )
        );
        $this->render('all_bid',array('dataProvider'=>$dataProvider));
    }
    
}
?>